package com.xiaoshuidi.cloud.module.finance.api.finance;

import com.xiaoshuidi.cloud.framework.common.pojo.CommonResult;
import com.xiaoshuidi.cloud.module.finance.dal.dataobject.finance.FinancePaymentChangeLogDO;
import com.xiaoshuidi.cloud.module.finance.dal.mysql.finance.FinancePaymentChangeLogMapper;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
public class FinancePaymentChangeLogApiImpl implements FinancePaymentChangeLogApi {
    @Resource
    private FinancePaymentChangeLogMapper financePaymentChangeLogMapper;

    /**
     * 统计未完成的打款失败数量
     */
    @Override
    public CommonResult<Long> noChangeLogCount() {
        return CommonResult.success(financePaymentChangeLogMapper.selectCount(FinancePaymentChangeLogDO::getIsChange,0));
    }
}
